<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<head>
   <%@ include file="/common/CimsCommon.jsp" %>
   <title>新增合作机构交易流水表</title>
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="<%=basePath%>/css/cims/cmmBase.css">
	<script type="text/javascript" src="<%=basePath%>/js/cims/creditRedemption/creditRedemption.js"></script>
	<script type="text/javascript" src="${basePath}/js/cims/publicJs/modelManage.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			var value = $('#dtocooperorgCode').val();
			var cooperativeAgencyDealStatus = $('#cooperativeAgencyDealStatus').val();
			
			Cmm.util.dateInputInit("addNewsFormData");
			
			if(value==""|| null ==value){
				toAddContract();
			}else{
				initFnCreditDetailView();				
				searchCreditPackage();
				CreditValueSum();
			}
			
			if(cooperativeAgencyDealStatus=="03"){
				$("#finishDeal").hide();
			}
			if(value!="XS"){
				$("#finishDeal").hide();
			}
	   		
		});
	</script>
	
</head>
  
<body style="background-color:#FFFFFF;">
<div id="formPageSwap">
  <br/>
<form id="addNewsFormData" name="addNewsFormData" isCheck="true" action="com.jy.modules.cims.creditDeal.controller.TCMmCooperorgDealController">
 <table id="addNewsTableId" class="formTableSwap" style="background:#D9D8DF;" border="0" align="center" cellpadding="0" cellspacing="1" >
<tr>
<td colspan="6" align="center" class="thTop">合约信息 <!-- <span id="spanCode"><a class="aColor" href="javascript:void(0)" onclick="toAddContract()" >重新选择合约</a></span> --></td>
</tr>
<tr>
  <th> 合作机构 ：</th>
  <td >
  <input type="text" style="display:none;" id="exportType" value="redemption">
  <input type="text" style="display:none;" id="creditAffiliation" value="0">
  <input type="text" style="display:none;" name="isSelectContract" id="isSelectContract" value="true">
  <input type="text" style="display:none;" id="isDeleteAndIsExport" value="false">
  <input type="text" style="display:none;" name="idValue" id="idValue" value="${id}">
  <input type="text" style="display:none;" name="dealCode" id="dealCode" value="${dealCode}" >
  <input type="text" style="display:none;" name="dealDate" id="dealDate" value="${dealDto.dealDate}" >
  <input type="text" style="display:none;" name="fileName" id="fileName" value="赎回信息">
  <input type="text" style="display:none;" name="isRedemption" id="isRedemption" value="true">
  <input type="text" style="display:none;" name="dealType" id="dealType" value="08">
  <input type="text" style="display:none;" name="dealTypes" id="dealTypes" value="'01','02'">
  <input disabled="disabled" style="display:none;" type="text" class="text" id="dtocooperorgCode" name="cooperorgCode"   value="${dto.cooperorgDTO.cooperorgCode}" />
  <input disabled="disabled" type="text" class="text" id="dtocooperorgName" name="cooperorgName"   value="${dto.cooperorgDTO.cooperorgName}" />
  <input disabled="disabled" type="text" class="text" id="cooperativeAgencyDealStatus" name="cooperativeAgencyDealStatus"   value="${dealDto.cooperativeAgencyDealStatus}" />
  </td>
  <th> 协议名称 ：</th>
  <td >
  <input disabled="disabled" style="display:none;" type="text" class="text" id="dtoagreementCode" name="agreementCode"   value="${dto.agreementDTO.agreementCode}" /> 
  <input disabled="disabled" type="text" class="text" id="dtoagreementName" name="agreementName"   value="${dto.agreementDTO.agreementName}" />
  </td>
  <th> 合约名称 ：</th>
  <td > 
  <input disabled="disabled" style="display:none;" type="text" class="text" id="dtocontractCode" name="contractCode"   value="${dto.cdto.contractCode}" />
  <input disabled="disabled" type="text" class="text" id="dtocontractName" name="contractName"   value="${dto.cdto.contractName}" />
  </td> 
</tr>

<tr>

  <th> 价格认定方：</th>
  <td colspan="6"> 
<syscode:dictionary name="creditorAffirmRule" extendProperty="notNull=false" codeType="creditConfirm" id="dtocreditorAffirmRule"	
      defaultValue="${dto.cdto.creditorAffirmRule}" className="text" type="select"/>  </td> 
</tr>

<tr id="creditOperation">
 	<td colspan="6" align="center" class="thTop">债权操作</td>	
</tr>

<tr id="creditPackageColumn">
   <th> 选择债权包：</th>
   <td>
  	 <select id="creditPackage" style="display:none;"></select>
  	 <input id="dealPackage" disabled="disabled" value="${dealDto.creditPackageName}">
  </td>
  <th> 赎回日期：</th>
  <td colspan="4">
  	 <input type="text" class="text" id="redemptionDate" name="redemptionDate"  value="${dealDto.redemptionDate}" />
  </td>
</tr>
</table>

<!-- 列表按钮操作 start -->
	<div id="creditDetailOperation" class="tableToolbar">
		  	<a href="javascript:void(0)" onclick="toAddDataCredit()" >新 增</a>
		  	<a href="javascript:void(0)" onclick="deleteCredit()" >删 除</a>
		  	<a href="javascript:void(0)" onclick="sureExport()" >导出</a>
		  	<a href="javascript:void(0)" onclick="importCreditDetail()" >导入</a>
	</div>
	<div id="creditDetailTable">
		<%@include file="../creditRedemption/viewCreditDealDetail.jsp" %>
	</div>
 
<!-- <table class="formTableSwap" border="0" align="center" cellpadding="0" cellspacing="1">
<tr>
 	<td colspan="6" align="center" class="thTop">债权结算</td>	
</tr>

<tr>
  <th style="width:100px;"> 费用金额：</th>
  <td colspan="6" align="left"> 
  <input type="text" class="text" id="dtopracticalSellSum" name="practicalSellSum"  maxLength="11" value="" />
  </td>
 
</tr>
</table> -->

</form>
<div class="expandToolbar">
		<span class="submitBtn mouseName" onclick="saveCreditDeal()">保存</span>
<!-- 		<span class="submitBtn mouseName" onclick="settleCreditDeal()">试算</span>
 -->		
 		<span  id="finishDeal" title="发送赎回通知-向上接口" class="submitBtn mouseName" onclick="doFinish()">完成</span>	
 		<span class="submitBtn mouseName" onclick="parent.tabs.close()">关闭</span>
</div>
</div>

</body>

<script type="text/javascript">
   $(document).ready(function(){
   		checkedInit();
   		$("#dtocreditorAffirmRule").prop("disabled",true);
   		$("#redemptionDate").prop("disabled",true);
   		
	});
	
	
	
</script>
  
</html>
